﻿
CREATE FUNCTION [dbo].[NormalizeMonth]( @TheDate smalldatetime) 
RETURNS smalldatetime
AS
BEGIN
	DECLARE @datNowDate smalldatetime

	SET @datNowDate = dbo.NormalizeDate(@TheDate)
	SET @datNowDate = DateAdd( day, 1 - Datepart(day, @datNowDate), @datNowDate  )

	RETURN @datNowDate
END
